<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .main {
            width: 600px;
            margin: auto;
            border-top: 4px solid #000;
        }

        ul li {
            width: 120px;
            height: 58px;
            /* background-color: pink; */
            list-style: none;
            float: left;
            line-height: 50px;
            text-align: center;
            margin-left: 10px;
        }

        .nav1 {
            background-image: url(images/bg1.png);
            transition: all 0.3s;
        }

        .nav1:hover {
            background-image: url(images/bg5.png);
        }

        .nav2 {
            background-image: url(images/bg2.png);
            transition: all 0.3s;
        }

        .nav2:hover {
            background-image: url(images/bg6.png);
        }

        .nav3 {
            background-image: url(images/bg3.png);
            transition: all 0.3s;
        }

        .nav3:hover {
            background-image: url(images/bg5.png);

        }

        .nav4 {
            background-image: url(images/bg4.png);
            transition: all 0.3s;
        }

        .nav4:hover {
            background-image: url(images/bg7.png);
        }
    </style>
</head>

<body>
    <div class="main">
        <ul>
            <li class="nav1">五彩导航</li>
            <li class="nav2">五彩导航</li>
            <li class="nav3">五彩导航</li>
            <li class="nav4">五彩导航</li>
        </ul>
    </div>
</body>

</html>